#pragma once
#include "../drawopencv.h"
class CDrawMotionDetect :
	public CDrawOpenCV 
{
public:
	CDrawMotionDetect(void);
	virtual ~CDrawMotionDetect(void);
	DECLARE_MESSAGE_MAP()
public:
	// DealwithFrame
	virtual void DealwithFrame(void);
private:
	void  UpdateMhi( IplImage* img, IplImage* dst, int diff_threshold );
	int last;
	IplImage *mhi; // MHI
	IplImage **buf;
	
	IplImage *orient; // orientation
	//IplImage *mask = 0; // valid orientation mask
	IplImage *segmask; // motion segmentation map
	IplImage* mask;
	//const int N = 4;
	//const double MHI_DURATION = 1;
	//const double MAX_TIME_DELTA = 0.5;
	//const double MIN_TIME_DELTA = 0.05;
	CvMemStorage* storage;
};

